#define TCPCONFIG 3
#use "dcrtcp.lib"

void main()
{
   char	buffer[100];
   sock_init();

   // Wait for the interface to come up
	while (ifpending(IF_DEFAULT) == IF_COMING_UP)
   {
		tcp_tick(NULL);
	}

   while (1)
   {
   	printf( "My IP address is %s\n\n", inet_ntoa(buffer, gethostid()) );
   }
}